package thread.lock;

public class Test {
    public static void main(String[] args) {
        Store store = new Store();
        Consumer consumer = new Consumer(store);
        Producer producer = new Producer(store);

        Thread c1 = new Thread(consumer, "丈夫");
        Thread c2 = new Thread(consumer, "妻子");

        Thread p1 = new Thread(producer, "老板A");
        Thread p2 = new Thread(producer, "老板B");

        c1.start();
        c2.start();
        p1.start();
        p2.start();
    }
}
